package com.ethannhu.todaynews.component.guide

import android.content.Context
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentStatePagerAdapter
import androidx.viewpager2.adapter.FragmentStateAdapter
import com.ethannhu.todaynews.adapter.BaseFragmentPagerAdapter

class GuideAdapter(context: Context, fragmentManager: FragmentManager)
    : BaseFragmentPagerAdapter<Int>(context, fragmentManager) {

    /**
     * 获取当前位置的数据
     */
    override fun getItem(position: Int): Fragment {
        return GuideFragment.newInstance(getData(position))
    }

}